package com.celesea.workflow.collaboration.v1.controller.resource;

import com.celesea.framework.util.DictionaryVoUtil;
import com.celesea.framework.vo.DictionaryVo;
import com.celesea.workflow.collaboration.entity.Collaboration;
import com.celesea.workflow.core.entity.Workflow;

import java.util.List;

/**
 * @author JackYuan
 * @create 2017-11-18 15:45
 */
public class CollaborationResource extends Workflow {

    private DictionaryVo collaborationDept;

    private String taskName;

    private String taskContent;

    private List<DictionaryVo> users;

    public CollaborationResource(Collaboration model) {
        super.copyApplyInfo(model);
        DictionaryVo collaborationDept = new DictionaryVo(
                model.getCollaborationDeptId(), model.getCollaborationDeptName());
        this.collaborationDept = collaborationDept;
        this.taskName = model.getTaskName();
        this.taskContent = model.getTaskContent();
        this.users = DictionaryVoUtil.toDictionarys(model.getUsers());
    }

    public DictionaryVo getCollaborationDept() {
        return collaborationDept;
    }

    public void setCollaborationDept(DictionaryVo collaborationDept) {
        this.collaborationDept = collaborationDept;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getTaskContent() {
        return taskContent;
    }

    public void setTaskContent(String taskContent) {
        this.taskContent = taskContent;
    }

    public List<DictionaryVo> getUsers() {
        return users;
    }

    public void setUsers(List<DictionaryVo> users) {
        this.users = users;
    }
}
